* FILE NAME : CASH406.PRG
*
STORE 0 TO CNT,CR
DO WHILE dISPk=SPACE(5) .AND. LASTKEY()<>27
   STORE 0 TO CNT,CR
   SELE 10
   SET EXCLU OFF
   use &dr&f10 INDEX &DR&F10
   GO TOP
   SEEK DISPIN

** dickson - 17/4/99 - to allow to 
**   do while left(dISP_code,1)=dISPin
   do while left(dISP_code,2)=dISPin
**
      IF FOR_SALE .and. sale_price>0
         CNT=CNT+1
      ENDIF
      skip
   ENDDO
   IF CNT=0
      RETURN
   ENDIF
   DECLARE FLD[CNT]
   DECLARE KDP[CNT]
   DECLARE LNG[CNT]
   SELE 10
   GO TOP
   SEEK DISPIN

**  dickson 17/4/99 
**   do while left(dISP_code,1)=dISPin
   do while left(dISP_code,2)=dISPin
**
      IF FOR_SALE .and. sale_price>0
         CR=CR+1
         LNG[CR]=LEN(ALLTRIM(DISP_NAME))+LEN(ALLTRIM(DISP_TYPE))+LEN(ALLTRIM(DISP_UNIT))+LEN(ALLTRIM(DISP_QANT))
         FLD[CR]=DISP_CODE+' '+ALLTRIM(DISP_NAME)+' '+ALLTRIM(DISP_TYPE)+' '+aLLTRIM(DISP_QANT)+' '+ALLTRIM(DISP_UNIT)+SPACE(50-LNG[CR])
         KDP[CR]=DISP_CODE
      ENDIF
      SKIP
   ENDDO
   SET COLOR TO BG+/B
*   @ 9,0 clea to 20,79
   set colo to gr+/rb,gr+/r
   @ 12,33 clea to 20,79
   @ 12,33 to 20,79 double
   pilih=achoice(13,34,19,78,FLD)
   IF LASTKEY()=13
      LNGT=LNG[PILIH]
      FILD=FLD[PILIH]
      DISPK=KDP[PILIH]
   ELSE
      DISPK=SPACE(5)
   ENDIF
endDO
